home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / arch / sparc / include / asm / ebus_dma.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-12-24  |  1.1 KB  |  36 lines

  1. #ifndef __ASM_SPARC_EBUS_DMA_H
  2. #define __ASM_SPARC_EBUS_DMA_H
  3.  
  4. struct ebus_dma_info {
  5.     spinlock_t    lock;
  6.     void __iomem    *regs;
  7.  
  8.     unsigned int    flags;
  9. #define EBUS_DMA_FLAG_USE_EBDMA_HANDLER        0x00000001
  10. #define EBUS_DMA_FLAG_TCI_DISABLE        0x00000002
  11.  
  12.     /* These are only valid is EBUS_DMA_FLAG_USE_EBDMA_HANDLER is
  13.      * set.
  14.      */
  15.     void (*callback)(struct ebus_dma_info *p, int event, void *cookie);
  16.     void *client_cookie;
  17.     unsigned int    irq;
  18. #define EBUS_DMA_EVENT_ERROR    1
  19. #define EBUS_DMA_EVENT_DMA    2
  20. #define EBUS_DMA_EVENT_DEVICE    4
  21.  
  22.     unsigned char    name[64];
  23. };
  24.  
  25. extern int ebus_dma_register(struct ebus_dma_info *p);
  26. extern int ebus_dma_irq_enable(struct ebus_dma_info *p, int on);
  27. extern void ebus_dma_unregister(struct ebus_dma_info *p);
  28. extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr,
  29.                 size_t len);
  30. extern void ebus_dma_prepare(struct ebus_dma_info *p, int write);
  31. extern unsigned int ebus_dma_residue(struct ebus_dma_info *p);
  32. extern unsigned int ebus_dma_addr(struct ebus_dma_info *p);
  33. extern void ebus_dma_enable(struct ebus_dma_info *p, int on);
  34.  
  35. #endif /* __ASM_SPARC_EBUS_DMA_H */
  36.